package com.bot.nft.module.cm.api;


import com.bot.common.pojo.CommonResult;
import com.bot.nft.module.cm.controller.CarouselController;
import com.bot.nft.module.cm.domain.vo.CmCarouselInfoVo;
import com.bot.nft.module.cm.service.ICmCarouselService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 描述:首页轮播控制层
 * <p>
 * 时间: 2023-12-04 08:53
 * 负责人: 卢梦丽
 **/
@CrossOrigin
@RestController
@RequestMapping("/app/cm")
public class AppCarouselController extends CarouselController {

    @Resource
    private ICmCarouselService iCmCarouselService;

    /**
     * 查询已启用的轮播图
     * @return
     */
    @GetMapping("/carousel.do")
    public CommonResult<List<CmCarouselInfoVo>> queryAuthorByPage() {
        List<CmCarouselInfoVo> cmCarouselInfoVos = iCmCarouselService.queryCarousel();
        return CommonResult.data(cmCarouselInfoVos);
    }

}
